<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>KMCGE Gateway</title>
    <link rel="stylesheet" href="./css/buttons.css">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
    <script src="//code.jquery.com/jquery-1.9.1.js"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css">
    <script>
        $(function () {
            $("#tabs").tabs();
        });
    </script>
    <style type="text/css">
        table {
            border-collapse: collapse;
            margin: 0 auto;
            text-align: center;
            font-size: small;
        }

        table td, table th {
            border: 1px solid #cad9ea;
            color: #666;
            height: 30px;
        }

        table thead th {
            background-color: #CCE8EB;
            width: 100px;
        }

        table tr:nth-child(odd) {
            background: #fff;
        }

        table tr:nth-child(even) {
            background: #F5FAFA;
        }
    </style>
</head>
<body>
<h1 style="text-align: center;">欢迎访问KMCGE网关系统！</h1>

<form action="/logout">
    <button type="submit" class="button button-primary button-rounded button-small">登出</button>
</form>
<br/>
<div id="tabs" style="font-size: medium;">
    <ul>
        <li><a href="#tabs-1">KMCGE网关</a></li>
        <li><a href="#tabs-2">IWG服务端</a></li>
        <li><a href="#tabs-3">KMCGE服务端(仅供调试)</a></li>
    </ul>
    <div id="tabs-1">
        <p>
        <table width="90%" class="table">
            <thead>
            <th>配置项</th>
            <th>配置值</th>
            </thead>
            <tbody>
            <tr>
                <td>配置标识</td>
                <td>${(kmingGateway.cfg.cfgId)!""}</td>
            </tr>
            <tr>
                <td>KMCGE服务地址：</td>
                <td>${(kmingGateway.cfg.remoteHost)!""}</td>
            </tr>
            <tr>
                <td>KMCGE服务端口：</td>
                <td>${(kmingGateway.cfg.remotePort)!""}</td>
            </tr>
            <tr>
                <td>启动时运行</td>
                <td>${(kmingGateway.cfg.shouldLaunch!false == true)?string("运行", "停止")}</td>
            </tr>
            <tr>
                <td>当前状态</td>
                <td>${(kmingGateway.cfg.running == true) ?string("运行", "停止")}</td>
            </tr>
            <tr>
                <td>刷新间隔(秒)</td>
                <td>${(kmingGateway.cfg.sleepSeconds)!""}</td>
            </tr>
            <tr>
                <td>AES秘钥</td>
                <td>${(kmingGateway.cfg.aesPassShow)!""}</td>
            </tr>
            <tr>
                <td>上传数据加密</td>
                <td>${(kmingGateway.cfg.sendSecret == true) ?string("密文", "明文")}</td>
            </tr>
            <tr>
                <td>上传数据分包</td>
                <td>${(kmingGateway.cfg.splitPacket == true) ?string("分包", "不分包")}</td>
            </tr>
            <tr>
                <td>上传请求加密</td>
                <td>${(kmingGateway.cfg.uploadSecret == true) ?string("密文", "明文")}</td>
            </tr>
            <tr>
                <td>源缓冲池</td>
                <td>${(kmingGateway.cfg.fromCollection)!""}</td>
            </tr>
            <tr>
                <td>目标缓冲池</td>
                <td>${(kmingGateway.cfg.toCollection)!""}</td>
            </tr>
            </tbody>
        </table>
        </p>
    </div>
    <div id="tabs-2">
        <p>
        <table width="90%" class="table">
            <thead>
            <th>配置项</th>
            <th>配置值</th>
            </thead>
            <tbody>
            <tr>
                <td>配置标识</td>
                <td>${(iwgServer.cfg.cfgId)!""}</td>
            </tr>
            <tr>
                <td>KMCGE服务端口：</td>
                <td>${(iwgServer.cfg.localPort)!""}</td>
            </tr>
            <tr>
                <td>启动时运行</td>
                <td>${(iwgServer.cfg.shouldLaunch!false == true)?string("运行", "停止")}</td>
            </tr>
            <tr>
                <td>当前状态</td>
                <td>${(iwgServer.cfg.running == true) ?string("运行", "停止")}</td>
            </tr>
            <tr>
                <td>缓冲池名称</td>
                <td>${(iwgServer.cfg.toCollection)!""}</td>
            </tr>
            </tbody>
        </table>
        </p>
    </div>
    <div id="tabs-3">
        <p>
        <table width="90%" class="table">
            <thead>
            <th>配置项</th>
            <th>配置值</th>
            </thead>
            <tbody>
            <tr>
                <td>配置标识</td>
                <td>${(kmingServer.cfg.cfgId)!""}</td>
            </tr>
            <tr>
                <td>KMCGE服务端口：</td>
                <td>${(kmingServer.cfg.localPort)!""}</td>
            </tr>
            <tr>
                <td>启动时运行</td>
                <td>${(kmingServer.cfg.shouldLaunch!false == true)?string("运行", "停止")}</td>
            </tr>
            <tr>
                <td>当前状态</td>
                <td>${(kmingServer.cfg.running == true) ?string("运行", "停止")}</td>
            </tr>
            <tr>
                <td>AES秘钥</td>
                <td>${(kmingServer.cfg.aesPassShow)!""}</td>
            </tr>
            <tr>
                <td>缓冲池名称</td>
                <td>${(kmingServer.cfg.toCollection)!""}</td>
            </tr>
            </tbody>
        </table>
        </p>
    </div>
</div>

<p style="alignment: center; width: 80%;">
    <a href="#" class="button button-rounded button-tiny">服务器时钟: ${curTime?datetime!""}</a>
</p>
</body>
</html>